package com.zonski.jbots.engine;

public abstract class Resource 
{
    private String application;
    private Entity owner;

    /**
     * updates the resource
     */
    public void update(Engine engine)
        throws Exception
    {
        // default implementation : do nothing
    }

    public boolean isBeingUsed()
    {
        return false;
    }

    public Entity getOwner()
    {
        return this.owner;
    }

    public void setOwner(Entity owner, String application)
    {
        this.owner = owner;
        this.application = application;
    }

    /**
     * How the resource is being used by it's owner
     */
    public String getApplication()
    {
        return this.application;
    }

    /**
     * Creates a copy of this resource
     * @return a copy of this resource
     */
    public abstract Resource copy();
}
